"""
__project__ = 'thc'
__file_name__ = 'tset_runner'
__author__ = 'thc'
__time__ = '2020/12/26 14:59'
__product_name = PyCharm
-*- coding:utf-8 -*-
"""

import unittest
from HTMLTestRunner_cn import HTMLTestRunner
import time

report_dir = './test_report'
now = time.strftime('%Y-%m-%d %H_%M_%S')
file_name = report_dir + '/' + now + 'result.html'
# suite = unittest.TestSuite()
# suite.addTest
test_dir = './'
discovery = unittest.defaultTestLoader.discover(test_dir, pattern='test*.py')
with open(file_name, 'wb') as f:
    runner = HTMLTestRunner(stream=f, title='Test_1', description='test001')
    runner.run(discovery)


